home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / pc / Open Me for REALbasic 3 / REALbasic 3.2 / Goodies / Development Tools / XCMDs and XFCNs / File and Resource / SetVersion XCMD 1.0r / card_5908.txt < prev    next >
Encoding:
Text File  |  1994-04-15  |  3.8 KB  |  98 lines

  1. -- card: 5908 from stack: in.0r
  2. -- bmap block id: 6331
  3. -- flags: 0000
  4. -- background id: 2600
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on mouseUp
  8.   lock screen
  9.   hide cd fld more
  10.   unlock screen with zoom in
  11. end mouseUp
  12.  
  13. on closeCard
  14.   hide cd fld more
  15. end closeCard
  16.  
  17.  
  18. -- part 1 (field)
  19. -- low flags: 01
  20. -- high flags: 0000
  21. -- rect: left=10 top=108 right=122 bottom=77
  22. -- title width / last selected line: 0
  23. -- icon id / first selected line: 0 / 0
  24. -- text alignment: 0
  25. -- font id: 3
  26. -- text size: 9
  27. -- style flags: 256
  28. -- line height: 12
  29. -- part name: 
  30.  
  31.  
  32. -- part 2 (button)
  33. -- low flags: 00
  34. -- high flags: A002
  35. -- rect: left=297 top=241 right=254 bottom=343
  36. -- title width / last selected line: 0
  37. -- icon id / first selected line: 0 / 0
  38. -- text alignment: 1
  39. -- font id: 3
  40. -- text size: 9
  41. -- style flags: 0
  42. -- line height: 12
  43. -- part name: More
  44. ----- HyperTalk script -----
  45. on mouseUp
  46.   lock screen
  47.   show cd fld more
  48.   unlock screen with zoom out
  49. end mouseUp
  50.  
  51.  
  52.  
  53. -- part 3 (field)
  54. -- low flags: 81
  55. -- high flags: 2002
  56. -- rect: left=10 top=75 right=300 bottom=497
  57. -- title width / last selected line: 0
  58. -- icon id / first selected line: 0 / 0
  59. -- text alignment: 0
  60. -- font id: 3
  61. -- text size: 9
  62. -- style flags: 0
  63. -- line height: 12
  64. -- part name: More
  65.  
  66.  
  67. -- part contents for background part 5
  68. ----- text -----
  69. 6
  70.  
  71. -- part contents for background part 2
  72. ----- text -----
  73. There is a alternate way to call SetVersion XCMD that displays a dialog box in which you can fill in all the vers fields at one time.  You do this by calling SetVersion without ANY parameters:
  74.  
  75.  
  76.  
  77. In order for this to work you must have the SetVersion DLOG, DITL, and STR# resources (all ID 3101) in the current stack or Home stack.
  78.  
  79. A dialog is displayed containing edit text fields for the version NUMBER, the long string, and the auxiliary string and a popup menu containing the Country Codes.
  80.  
  81. You can add, subtract, and modify the country names that appear in the popup menu by editing the STR# resource with ResEdit.  Use ResEdit to change line 1 of this resource to the LINE NUMBER of the popup menu that will be the default.  The remaining entries in the STR# resource consist of an ALPHABETICAL list of countries, interspaced with their corresponding Country Code.
  82.  
  83. When the dialog is initially displayed, it will display the fields of the current vers resources, if there are any.  If there ARE vers resources, the Country Code from vers 1 will be shown in the popup, NOT the country that you set with the STR# resource.
  84.  
  85. -- part contents for card part 1
  86. ----- text -----
  87. SetVersion
  88.  
  89. -- part contents for card part 3
  90. ----- text -----
  91. The STR# resource (ID 3101) consists of an ALPHABETICAL list of the country names (and their associated Country Codes) that SetVersion XCMD accepts.  This list is used both to build the contents of the popup menu, and to determine what country names are valid.
  92.  
  93. There are instances where you may wish to modify this list:
  94. 1.  To add new countries and Country Codes to the list;
  95. 2.  To change the spelling of the country names to another language;
  96. 3.  To change the "default" country name (the country name that is shown in the popup menu when the ¬†¬† SetVersion dialog is initially displayed).
  97.  
  98. This can be accomplished by editing the STR# resource with ResEdit.  Item 1 of the list is a NUMBER that corresponds to the LINE NUMBER from the popup menu that will be the default.  Lines 2 and 3 contain the text that is shown in the dialog depending on whether or not the vers resources are present  ("Current field contents:" or "vers x is currently absent").  The remaining items in the list consist of an ALPHABETICAL list of the country names interspaced with their corresponding Country Codes.  The Country Code for each country is listed AFTER the country name.  When adding new countries to the list, maintain the alphabetical orientation.